from typing import Dict

from faker import Faker

from common import helper
from modules.datafaker.strategies.base_strategy import BaseStrategy

## https://faker.readthedocs.io/en/stable/providers.html

strategy_map: Dict[str, BaseStrategy] = {}


class PersonNameStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'personName'

    def __init__(self):
        self.title = '人名'
        self.name = PersonNameStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.name()


strategy_map[PersonNameStrategy.strategy_name()] = PersonNameStrategy()


# class AddressStrategy(BaseStrategy):
#     @staticmethod
#     def strategy_name():
#         return 'address'
#
#     def __init__(self):
#         self.title = '地址'
#         self.name = AddressStrategy.strategy_name()
#
#     def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
#         return faker_engine.name()
#
#
# strategy_map[AddressStrategy.strategy_name()] = AddressStrategy()


class BuildingNumberStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'building_number'

    def __init__(self):
        self.title = '楼号'
        self.name = BuildingNumberStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.building_number()


strategy_map[BuildingNumberStrategy.strategy_name()] = BuildingNumberStrategy()


class CountryNameStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'countryName'

    def __init__(self):
        self.title = '国家名'
        self.name = CountryNameStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.country()


strategy_map[CountryNameStrategy.strategy_name()] = CountryNameStrategy()


class CityStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'city'

    def __init__(self):
        self.title = '城市名(带市县)'
        self.name = CityStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.city()


strategy_map[CityStrategy.strategy_name()] = CityStrategy()


class City2Strategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'city2'

    def __init__(self):
        self.title = '城市名(不带市县)'
        self.name = City2Strategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.city_name()


strategy_map[City2Strategy.strategy_name()] = City2Strategy()


class CountryCodeStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'countryCode'

    def __init__(self):
        self.title = '国家编号'
        self.name = CountryCodeStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.country_code()


strategy_map[CountryCodeStrategy.strategy_name()] = CountryCodeStrategy()


class DistrictNameStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'districtName'

    def __init__(self):
        self.title = '地区名'
        self.name = DistrictNameStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.district()


strategy_map[DistrictNameStrategy.strategy_name()] = DistrictNameStrategy()


class PostcodeStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'postcode'

    def __init__(self):
        self.title = '邮编'
        self.name = PostcodeStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.postcode()


strategy_map[PostcodeStrategy.strategy_name()] = PostcodeStrategy()


class StreetAddressStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'streetAddress'

    def __init__(self):
        self.title = '街道地址'
        self.name = StreetAddressStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.street_address()


strategy_map[StreetAddressStrategy.strategy_name()] = StreetAddressStrategy()


class StreetNameStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'streetName'

    def __init__(self):
        self.title = '街道名称'
        self.name = StreetNameStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.street_name()


strategy_map[StreetNameStrategy.strategy_name()] = StreetNameStrategy()


class LicensePlateStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'licensePlate'

    def __init__(self):
        self.title = '车牌照'
        self.name = LicensePlateStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.license_plate()


strategy_map[LicensePlateStrategy.strategy_name()] = LicensePlateStrategy()


class BbanStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'bban'

    def __init__(self):
        self.title = '银行账号'
        self.name = BbanStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.bban()


strategy_map[BbanStrategy.strategy_name()] = BbanStrategy()


class IbanStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'iban'

    def __init__(self):
        self.title = '国际银行代码'
        self.name = IbanStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.iban()


strategy_map[IbanStrategy.strategy_name()] = IbanStrategy()


class IbanStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'iban'

    def __init__(self):
        self.title = '国际银行代码'
        self.name = IbanStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.iban()


strategy_map[IbanStrategy.strategy_name()] = IbanStrategy()


class BarcodeEan8Strategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'barcode-ean8'

    def __init__(self):
        self.title = 'EAN-8条形码'
        self.name = BarcodeEan8Strategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        prefixes = option['prefixes'] if option['prefixes'] is None else ''
        return faker_engine.ean(length=8, prefixes=(prefixes,))


strategy_map[BarcodeEan8Strategy.strategy_name()] = BarcodeEan8Strategy()


class BarcodeEan13Strategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'barcode-ean13'

    def __init__(self):
        self.title = 'EAN-13条形码'
        self.name = BarcodeEan13Strategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        prefixes = option['prefixes'] if option['prefixes'] is None else ''
        return faker_engine.ean13(length=13, prefixes=(prefixes,))


strategy_map[BarcodeEan13Strategy.strategy_name()] = BarcodeEan13Strategy()


class ColorStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'color'

    def __init__(self):
        self.title = '颜色(十六进制)'
        self.name = ColorStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.hex_color()


strategy_map[ColorStrategy.strategy_name()] = ColorStrategy()


class ColorRGBStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'color_rgb'

    def __init__(self):
        self.title = '颜色(RGB)'
        self.name = ColorRGBStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.color(color_format='rgb')


strategy_map[ColorRGBStrategy.strategy_name()] = ColorRGBStrategy()


class ColorHSVStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'color_hsv'

    def __init__(self):
        self.title = '颜色(HSV)'
        self.name = ColorHSVStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.color(color_format='hsv')


strategy_map[ColorHSVStrategy.strategy_name()] = ColorHSVStrategy()


class ColorHSLStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'color_hsl'

    def __init__(self):
        self.title = '颜色(HSL)'
        self.name = ColorHSLStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.color(color_format='hsl')


strategy_map[ColorHSLStrategy.strategy_name()] = ColorHSLStrategy()


class ColorNameStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'color_name'

    def __init__(self):
        self.title = '颜色名'
        self.name = ColorNameStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.color_name()


strategy_map[ColorNameStrategy.strategy_name()] = ColorNameStrategy()


class ColorRgbCssStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'color_rgb_css'

    def __init__(self):
        self.title = '颜色(RGB，css格式)'
        self.name = ColorRgbCssStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.rgb_css_color()


strategy_map[ColorRgbCssStrategy.strategy_name()] = ColorRgbCssStrategy()


class ColorWebSafeNameStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'color_web_safe_name'

    def __init__(self):
        self.title = '颜色名(Web安全颜色名称)'
        self.name = ColorWebSafeNameStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.safe_color_name()


strategy_map[ColorWebSafeNameStrategy.strategy_name()] = ColorWebSafeNameStrategy()


class ColorWebSafeStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'color_web_safe'

    def __init__(self):
        self.title = '颜色(Web安全颜色)'
        self.name = ColorWebSafeStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.safe_hex_color()


strategy_map[ColorWebSafeStrategy.strategy_name()] = ColorWebSafeStrategy()


class CompanyStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'company'

    def __init__(self):
        self.title = '公司名称'
        self.name = CompanyStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.company()


strategy_map[CompanyStrategy.strategy_name()] = CompanyStrategy()


class CompanySuffixStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'company_suffix'

    def __init__(self):
        self.title = '公司性质'
        self.name = CompanySuffixStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.company_suffix()


strategy_map[CompanySuffixStrategy.strategy_name()] = CompanySuffixStrategy()


class CreditCardFullStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'credit_card_full'

    def __init__(self):
        self.title = '信用卡详细信息'
        self.name = CreditCardFullStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.credit_card_full()


strategy_map[CreditCardFullStrategy.strategy_name()] = CreditCardFullStrategy()


class CreditCardExpireStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'credit_card_expire'

    def __init__(self):
        self.title = '信用卡到期日期'
        self.name = CreditCardExpireStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.credit_card_expire()


strategy_map[CreditCardExpireStrategy.strategy_name()] = CreditCardExpireStrategy()


class CreditCardNumberStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'credit_card_number'

    def __init__(self):
        self.title = '信用卡号'
        self.name = CreditCardNumberStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.credit_card_number()


strategy_map[CreditCardNumberStrategy.strategy_name()] = CreditCardNumberStrategy()


class CreditCardProviderStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'credit_card_provider'

    def __init__(self):
        self.title = '信用卡提供商名称'
        self.name = CreditCardProviderStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.credit_card_number()


strategy_map[CreditCardProviderStrategy.strategy_name()] = CreditCardProviderStrategy()


class CreditCardSecurityCodeStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'credit_card_security_code'

    def __init__(self):
        self.title = '信用卡安全码'
        self.name = CreditCardSecurityCodeStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.credit_card_security_code()


strategy_map[CreditCardSecurityCodeStrategy.strategy_name()] = CreditCardSecurityCodeStrategy()


class CurrencyStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'currency'

    def __init__(self):
        self.title = '货币'
        self.name = CurrencyStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.currency()


strategy_map[CurrencyStrategy.strategy_name()] = CurrencyStrategy()


class CurrencyCodeStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'currency_code'

    def __init__(self):
        self.title = '货币代码'
        self.name = CurrencyCodeStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.currency_code()


strategy_map[CurrencyCodeStrategy.strategy_name()] = CurrencyCodeStrategy()


class CurrencyNameStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'currency_name'

    def __init__(self):
        self.title = '货币名称'
        self.name = CurrencyNameStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.currency_name()


strategy_map[CurrencyNameStrategy.strategy_name()] = CurrencyNameStrategy()


class CurrencySymbolStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'currency_symbol'

    def __init__(self):
        self.title = '货币符号'
        self.name = CurrencySymbolStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.currency_symbol()


strategy_map[CurrencySymbolStrategy.strategy_name()] = CurrencySymbolStrategy()


class PricetagStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'pricetag'

    def __init__(self):
        self.title = '价格标签'
        self.name = PricetagStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.pricetag()


strategy_map[PricetagStrategy.strategy_name()] = PricetagStrategy()


class DateStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'date'

    def __init__(self):
        self.title = '日期'
        self.name = DateStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        # date_between(start_date: Union[
        #     datetime.date, datetime.datetime, datetime.timedelta, str, int] = '-30y', end_date: Union[
        #     datetime.date, datetime.datetime, datetime.timedelta, str, int] = 'today') → datetime.date
        start_date = option['start_date']
        end_date = option['end_date']
        if helper.is_blank(start_date) and helper.is_blank(end_date):
            return faker_engine.date(pattern='%Y-%m-%d')

        return faker_engine.date_between(pattern='%Y-%m-%d', start_date=start_date, end_date=end_date)


strategy_map[DateStrategy.strategy_name()] = DateStrategy()


class DateOfBirthStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'date_of_birth'

    def __init__(self):
        self.title = '出生日期'
        self.name = DateOfBirthStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        minimum_age = option['minimum_age']
        maximum_age = option['maximum_age']
        return faker_engine.date_of_birth(minimum_age=minimum_age, maximum_age=maximum_age)


strategy_map[DateOfBirthStrategy.strategy_name()] = DateOfBirthStrategy()


class DateThisMonthStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'date_this_month'

    def __init__(self):
        self.title = '当月日期'
        self.name = DateThisMonthStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.date_this_month()


strategy_map[DateThisMonthStrategy.strategy_name()] = DateThisMonthStrategy()


class DateThisYearStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'date_this_year'

    def __init__(self):
        self.title = '今年日期'
        self.name = DateThisYearStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.date_this_year()


strategy_map[DateThisYearStrategy.strategy_name()] = DateThisYearStrategy()


class DateTimeStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'date_time'

    def __init__(self):
        self.title = '日期时间'
        self.name = DateTimeStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        start_date = option['start_date']
        end_date = option['end_date']
        if helper.is_blank(start_date) and helper.is_blank(end_date):
            return faker_engine.date_time(pattern='%Y-%m-%d')

        return faker_engine.date_time_between(start_date=start_date, end_date=end_date)


strategy_map[DateTimeStrategy.strategy_name()] = DateTimeStrategy()


class DateTimeThisMonthStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'date_time_this_month'

    def __init__(self):
        self.title = '当月日期时间'
        self.name = DateTimeThisMonthStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.date_time_this_month()


strategy_map[DateTimeThisMonthStrategy.strategy_name()] = DateTimeThisMonthStrategy()


class DateTimeThisYearStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'date_time_this_year'

    def __init__(self):
        self.title = '今年日期时间'
        self.name = DateTimeThisYearStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.date_time_this_year()


strategy_map[DateTimeThisYearStrategy.strategy_name()] = DateTimeThisYearStrategy()


class DayOfMonthStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'day_of_month'

    def __init__(self):
        self.title = '月中的几号'
        self.name = DayOfMonthStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.day_of_month()


strategy_map[DayOfMonthStrategy.strategy_name()] = DayOfMonthStrategy()


class DayOfWeekStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'day_of_week'

    def __init__(self):
        self.title = '星期几/周几'
        self.name = DayOfWeekStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.day_of_week()


strategy_map[DayOfWeekStrategy.strategy_name()] = DayOfWeekStrategy()


class FutureDateStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'future_date'

    def __init__(self):
        self.title = '未来日期'
        self.name = FutureDateStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.future_date()


strategy_map[FutureDateStrategy.strategy_name()] = FutureDateStrategy()


class FutureDateTimeStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'future_datetime'

    def __init__(self):
        self.title = '未来日期时间'
        self.name = FutureDateTimeStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.future_datetime()


strategy_map[FutureDateTimeStrategy.strategy_name()] = FutureDateTimeStrategy()


class MonthStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'month'

    def __init__(self):
        self.title = '月份'
        self.name = MonthStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.month()


strategy_map[MonthStrategy.strategy_name()] = MonthStrategy()


class YearStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'year'

    def __init__(self):
        self.title = '年份'
        self.name = YearStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.year()


strategy_map[YearStrategy.strategy_name()] = YearStrategy()


class MonthNameStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'month_name'

    def __init__(self):
        self.title = '月份名'
        self.name = MonthNameStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.month_name()


strategy_map[MonthNameStrategy.strategy_name()] = MonthNameStrategy()


class TimeStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'time'

    def __init__(self):
        self.title = '时间'
        self.name = TimeStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.time()


strategy_map[TimeStrategy.strategy_name()] = TimeStrategy()


class TimeZoneStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'timezone'

    def __init__(self):
        self.title = '时区'
        self.name = TimeZoneStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.timezone()


strategy_map[TimeZoneStrategy.strategy_name()] = TimeZoneStrategy()


class LatitudeStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'latitude'

    def __init__(self):
        self.title = '纬度'
        self.name = LatitudeStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.latitude()


strategy_map[LatitudeStrategy.strategy_name()] = LatitudeStrategy()


class LongitudeStrategy(BaseStrategy):
    @staticmethod
    def strategy_name():
        return 'longitude'

    def __init__(self):
        self.title = '经度'
        self.name = LongitudeStrategy.strategy_name()

    def fake_data(self, faker_engine: Faker, option: Dict[str, object]) -> object:
        return faker_engine.longitude()


strategy_map[LongitudeStrategy.strategy_name()] = LongitudeStrategy()


if __name__ == '__main__':
    fakeEngine = Faker("zh_CN")
    method = getattr(fakeEngine, "longitude", None)
    if method:
        a = method()
        print(a)
